﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master.master" AutoEventWireup="true" CodeFile="register.aspx.cs" Inherits="_Default" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 40%;
            padding-left:5px;
        }
        .style2
        {
            width:20%;
        }
        #extendInfo > tbody
        {
            width:100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="aside1" Runat="Server">
    
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="aside2" Runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="aside3" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="sectionContent" Runat="Server">
    <div style="border:1px solid #E7EEF6;">
        <header style="padding:10px; color:#3366CC; background-color:#f5f5f5; ">ĐĂNG KÍ TÀI KHOẢN</header>
        <div style="padding:5px;">
            Nếu bạn đã có tài khoản vui lòng <a>đăng nhập</a><br />
            Nếu bạn quyên mật khẩu vui lòng <a>cấp mật khẩu mới</a><br />
            Chấp nhận <a>login</a> với openID:<br />
            <img id="image1" runat="server" style=" height:32px;" alt="" src="<%$ Resources:Images, google %>" />
            <img id="Img1" runat="server" style="height:32px;" alt="" src="<%$ Resources:Images, yahoo %>" />
            <img id="Img2" runat="server" style="height:32px;" alt="" src="<%$ Resources:Images, facebook %>" />
        </div>
        <article>
            <h4 style="display: inline-block; margin-left: 6%; ; padding:15px 20px 3px 0px;color:#3366CC">THÔNG TIN BẮT BUỘC
            </h4>    
            <table style="width: 100%;">                
                <tr>
                    <td colspan="3" style="padding-left: 21%;">                        
                        <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                            ValidationGroup="TaoTK" 
                            HeaderText="Đăng kí thất bại. Sửa những lỗi sau" />
                    </td>
                   
                </tr>
                <tr>
                    <td style="text-align: right" class="style2">
                        
                        <asp:CustomValidator ID="CustomValidator3" runat="server" 
                            ControlToValidate="tbTenDangNhap" ErrorMessage="Tên đăng nhập đã tồn tại" 
                            onservervalidate="CustomValidator3_ServerValidate" ValidationGroup="TaoTK"><span 
                            style="color:red;">*</span></asp:CustomValidator>
                        
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                            ControlToValidate="tbTenDangNhap" 
                            ErrorMessage="Tên đăng nhập không dúng yêu cầu" 
                            ValidationExpression="\w{6,32}" ValidationGroup="TaoTK"><span 
                            style="color:red;">*</span></asp:RegularExpressionValidator>
                        
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" 
                            runat="server" ControlToValidate="tbTenDangNhap" 
                            ErrorMessage="Chưa nhập tên truy cập" 
                            Text="&lt;span  style=&quot;color:red;&quot;&gt;*&lt;/span&gt;" 
                            ValidationGroup="TaoTK"></asp:RequiredFieldValidator>
                        
                        Tên truy cập</td>
                    <td class="style1">
                        
                        <input id="tbTenDangNhap" runat="server" type="text" onmouseout="changeDisplay('ctl00_sectionContent_noteTenDangNhap1','none');" onmouseover="changeDisplay('ctl00_sectionContent_noteTenDangNhap1','block');" 
                            width="200px" class="rowTextBox" /></td>
                    <td class="noteRegister">
                        <asp:Label style="display:none;z-index:111;" ID="noteTenDangNhap1" runat="server" 
                            meta:resourcekey="noteTenDangNhap"></asp:Label>
                        <img id="Img3" runat="server" alt="" 
                            style="position:absolute;z-index:110; width: 97%; " 
                            src="<%$ Resources:Images,image1DK %>" /></td>
                </tr>
                <tr>
                    <td style="text-align: right" class="style2">
                        
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                            ControlToValidate="tbMatKhau" 
                            ErrorMessage="Mật khẩu không đúng yêu cầu" ValidationExpression="\w{6,32}" 
                            ValidationGroup="TaoTK"><span 
                            style="color:red;">*</span></asp:RegularExpressionValidator>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" 
                            runat="server" ControlToValidate="tbMatKhau" 
                            ErrorMessage="Chưa nhập mật khẩu" 
                            
                            
                            Text="&lt;span style=&quot;color:red;&quot;&gt;*&lt;/span&gt;" 
                            ValidationGroup="TaoTK"></asp:RequiredFieldValidator>
                        
                        Mật khẩu</td>
                    <td class="style1">
                        
                        <asp:TextBox ID="tbMatKhau" runat="server" 
                            onmouseout="changeDisplay('ctl00_sectionContent_notePass','none');" 
                            onmouseover="changeDisplay('ctl00_sectionContent_notePass','block');" 
                            class="rowTextBox" TextMode="Password" /></td>
                    <td class="noteRegister">                        
                        <asp:Label ID="notePass" style="display:none; z-index:111;" runat="server" meta:resourcekey="notePassResource1"></asp:Label>
                        
                    </td>
                </tr>
                <tr>
                    <td style="text-align: right" class="style2">
                        <asp:CompareValidator ID="CompareValidator1" runat="server" 
                            ControlToCompare="tbXNMatKhau" ControlToValidate="tbMatKhau" 
                            ErrorMessage="Xác nhận mật khẩu không chính xác" 
                            ValidationGroup="TaoTK"><span 
                            style="color:red;">*</span></asp:CompareValidator>
                        Xác nhận mật khẩu</td>
                    <td class="style1">
                        
                        <asp:TextBox ID="tbXNMatKhau" runat="server"  
                            onmouseout="changeDisplay('ctl00_sectionContent_noteRePass','none');" 
                            onmouseover="changeDisplay('ctl00_sectionContent_noteRePass','block');" 
                            class="rowTextBox" TextMode="Password" /></td>
                    <td class="noteRegister">
                        
                        <asp:Label ID="noteRePass" style="display:none;z-index:111;" runat="server" meta:resourcekey="noteRePassResource1"></asp:Label></td>
                </tr>
                <tr>
                    <td style="text-align: right" class="style2">
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" 
                            runat="server" ControlToValidate="tbTen" 
                            ErrorMessage="Chưa nhập tên" 
                            
                            
                            Text="&lt;span  style=&quot;color:red;&quot;&gt;*&lt;/span&gt;" 
                            ValidationGroup="TaoTK"></asp:RequiredFieldValidator>
                        Họ và tên</td>
                    <td class="style1">
                        
                        <input id="tbTen" runat="server" type="text" 
                            width="200px" class="rowTextBox" /></td>
                    <td class="noteRegister">
                        
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align: right" class="style2">
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" 
                            runat="server" ControlToValidate="ddNoiSinh" 
                            ErrorMessage="Chưa chọn nơi sinh" 
                            
                            
                            Text="&lt;span  style=&quot;color:red;&quot;&gt;*&lt;/span&gt;" 
                            ValidationGroup="TaoTK"></asp:RequiredFieldValidator>
                        Nơi sinh</td>
                    <td class="style1">
                        
                        <asp:DropDownList ID="ddNoiSinh" 
                            onmouseout="changeDisplay('ctl00_sectionContent_noteNoiSinh','none');" onmouseover="changeDisplay('ctl00_sectionContent_noteNoiSinh','block');"
                            runat="server" meta:resourcekey="DropDownList1Resource1" Width="97%" 
                            DataSourceID="SqlDataDiaChi" DataTextField="Ten" DataValueField="IDKhuVuc">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="SqlDataDiaChi" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:vnclickerConnectionString %>" 
                            SelectCommand="SELECT * FROM [KhuVuc]">
                        </asp:SqlDataSource>
                    </td>
                    <td class="noteRegister">
                        
                        <asp:Label ID="noteNoiSinh" runat="server" style="display:none;z-index:111;"
                            meta:resourcekey="noteNoiSinhResource"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: right" class="style2">
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                            ControlToValidate="tbEmail" 
                            ErrorMessage="Không chấp nhận địa chỉ Email dưới" 
                            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                            ValidationGroup="TaoTK"><span style="color:red;">*</span></asp:RegularExpressionValidator>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" 
                            runat="server" ControlToValidate="tbEmail" 
                            ErrorMessage="Chưa nhập Email" 
                            
                            
                            Text="&lt;span  style=&quot;color:red;&quot;&gt;*&lt;/span&gt;" 
                            ValidationGroup="TaoTK"></asp:RequiredFieldValidator>
                        Email</td>
                    <td class="style1">
                        
                        <input id="tbEmail" runat="server" type="text" onmouseout="changeDisplay('ctl00_sectionContent_noteEmail','none');" onmouseover="changeDisplay('ctl00_sectionContent_noteEmail','block');"
                            width="200px" class="rowTextBox" /></td>
                    <td class="noteRegister">
                        
                        <asp:Label ID="noteEmail" runat="server" style="display:none;z-index:111;"
                            meta:resourcekey="noteEmailResource1"></asp:Label></td>
                </tr>
                <tr>
                    <td style="text-align: right" class="style2">
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" 
                            ControlToValidate="tbMobile" 
                            ErrorMessage="Không chấp nhận số điện thoại dưới" 
                            ValidationExpression="[0+]\d{8,11}" ValidationGroup="TaoTK"><span 
                            style="color:red;">*</span></asp:RegularExpressionValidator>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" 
                            runat="server" ControlToValidate="tbMobile" 
                            ErrorMessage="Chưa nhập số ĐT" 
                            
                            
                            Text="&lt;span  style=&quot;color:red;&quot;&gt;*&lt;/span&gt;" 
                            ValidationGroup="TaoTK"></asp:RequiredFieldValidator>
                        Điện thoại</td>
                    <td class="style1">
                        
                        <input id="tbMobile" runat="server" type="text"    onmouseout="changeDisplay('ctl00_sectionContent_noteMobile','none');" 
                            onmouseover="changeDisplay('ctl00_sectionContent_noteMobile','block');" 
                            width="200px" class="rowTextBox" /></td>
                    <td class="noteRegister">                        
                        <asp:Label ID="noteMobile" runat="server" style="display:none;z-index:111;"
                            meta:resourcekey="noteMobile"></asp:Label></td></td>
                </tr>
                <tr>
                    <td style="text-align: right" class="style2">
                        Mã an toàn</td>
                    <td class="style1">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>                        
                                <asp:Image ID="ImageCapCha" Height="50px" Width="100px" runat="server" 
                                    ImageUrl="ImageCapcha.aspx" />
                                <asp:ImageButton ID="btnRefreshCapcha"                                 
                                    runat="server" 
                                    style="display:inline-block; margin-bottom:9px; margin-left:5px; " 
                                    Height="30px" Width="30px"
                                    ImageUrl="<%$ Resources:Images, refreshCapcha %>" onclick="refreshCapcha" 
                                    ></asp:ImageButton>    
                                &nbsp;</td>
                            </ContentTemplate>
                            <Triggers>
                                <asp:PostBackTrigger ControlID="btnRefreshCapcha" />
                            </Triggers>
                        </asp:UpdatePanel> 
                    <td class="noteRegister">
                        
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align: right" class="style2">
                        <asp:CustomValidator ID="CustomValidator1" runat="server" 
                            ErrorMessage="Nhập mã an toàn không chính xá" 
                            ControlToValidate="tbMaAnToan" 
                            onservervalidate="CustomValidator1_ServerValidate" ValidationGroup="TaoTK" 
                            ValidateEmptyText="True"><span style="color:red;">*</span></asp:CustomValidator>
                        Nhập mã an toàn</td>
                    <td class="style1">
                        
                        <input id="tbMaAnToan" runat="server" type="text" onmouseout="changeDisplay('ctl00_sectionContent_noteMaAnToan','none');" onmouseover="changeDisplay('ctl00_sectionContent_noteMaAnToan','block');"
                            width="200px" class="rowTextBox" /></td>
                    <td class="noteRegister">                        
                        <asp:Label ID="noteMaAnToan" runat="server" style="display:none;z-index:111;"
                            meta:resourcekey="noteMaAnToanResource1"></asp:Label></td>
                </tr>
                </table>
            <h4 style="display: inline-block; margin-left: 6%; ; padding:15px 20px 3px 0px;color:#3366CC">THÔNG TIN THÊM
            </h4>    
            <img src="Icons/downArow.png" onclick="toggleShowOjb('extendInfo')" style=" cursor:pointer; margin-left: -15px;margin-top: 10px;height:24px; height:24px; position: absolute;"/>
            <table id="extendInfo" style="width: 100%; display:;">
                <tr>
                    <td style="text-align: right" class="style2">
                        
                        Link ảnh đại diện</td>
                    <td class="style1">
                        
                        <input id="tbLinkAvarta" placeholder="<%$ Resources:Text,NoAvarta %>" runat="server" type="text" onblur="setUrl(this,'ctl00_sectionContent_imageAvarta')" onmouseout="changeDisplay('ctl00_sectionContent_noteLinkAnh','none');" onmouseover="changeDisplay('ctl00_sectionContent_noteLinkAnh','block');"
                            width="200px" class="rowTextBox" /></td>
                    <td class="noteRegister">
                        
                        <img runat="server" id="imageAvarta" alt="" src="<%$ Resources:Text,NoAvarta %>" 
                            style="position:absolute;z-index:110; width: 30%; "  
                             />
                        <asp:Label ID="noteLinkAnh" runat="server" style="display:none; z-index:111;"
                            meta:resourcekey="noteLinkAnh"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: right" class="style2">
                        Số CMND hoặc giấy tờ khác</td>
                    <td class="style1">
                        
                        <input id="tbCMND" runat="server" type="text" 
                            width="200px" class="rowTextBox" /></td>
                    <td class="noteRegister">
                        
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align: right" class="style2">
                        <asp:CustomValidator ID="CustomValidator2" runat="server" 
                            ErrorMessage="Ngày sinh không chính xác" 
                            ControlToValidate="tbNgaySinh" 
                            onservervalidate="CustomValidator2_ServerValidate" ValidationGroup="TaoTK"><span style="color:red;">*</span></asp:CustomValidator>
                        Ngày sinh</td>
                    <td class="style1">
                        
                        <input id="tbNgaySinh" runat="server" type="text" onmouseout="changeDisplay('ctl00_sectionContent_noteNgaySinh','none');" onmouseover="changeDisplay('ctl00_sectionContent_noteNgaySinh','block');"
                            width="200px" class="rowTextBox" /></td>
                    <td class="noteRegister">
                        <asp:Label ID="noteNgaySinh" runat="server" style="display:none;z-index:111;"
                            meta:resourcekey="noteNgaySinh"></asp:Label>
                        </td>
                </tr>
                <tr>
                    <td style="text-align: right" class="style2">
                        Website</td>
                    <td class="style1">
                        
                        <input id="tbWebsite" runat="server" type="text" 
                            width="200px" class="rowTextBox" /></td>
                    <td class="noteRegister">
                        
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align: right" class="style2">
                        Điện thoại cố định</td>
                    <td class="style1">
                        
                        <input id="tbPhone" runat="server" type="text" 
                            width="200px" class="rowTextBox" /></td>
                    <td class="noteRegister">
                        
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align: right" class="style2">
                        Ngân hàng</td>
                    <td class="style1">
                        <asp:DropDownList ID="ddNganHang" 
                            runat="server" meta:resourcekey="DropDownList1Resource1" Width="97%" 
                            DataSourceID="SqlDataNganHang" DataTextField="TenDayDu" 
                            DataValueField="IDNganHang">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="SqlDataNganHang" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:vnclickerConnectionString %>" 
                            SelectCommand="SELECT [IDNganHang], [TenDayDu] FROM [NganHang]">
                        </asp:SqlDataSource>
                        </td>
                    <td class="noteRegister">
                        
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align: right" class="style2">
                        Số TK Ngân hàng</td>
                    <td class="style1">
                        
                        <input id="tbSoTaiKhoan" runat="server" type="text" 
                            width="200px" class="rowTextBox" /></td>
                    <td class="noteRegister">
                        
                        &nbsp;</td>
                </tr>
                </table>
                <div style="padding-left:20%; padding-top: 10px;">
                    <asp:CheckBox ID="cbAgree" runat="server"
                        meta:resourcekey="cbDongY" AutoPostBack="True" 
                        oncheckedchanged="cbAgree_CheckedChanged" />
                    <asp:HyperLink 
                        ID="linkDieuKhoan" runat="server" 
                        NavigateUrl="<%$ Resources:Text, WebsiteName %>"  
                        meta:resourcekey="linkDieuKhoan">[linkDieuKhoan]</asp:HyperLink> <br />
                    <asp:Button class="btnGray" style="margin-left:100px; margin-top:10px;" 
                        ID="btnTaoTK" runat="server" 
                        meta:resourcekey="btnTaoTK" Enabled="False" ValidationGroup="TaoTK" onclick="btnTaoTK_Click1"
                         />
                      
                </div>
        </article>
    </div>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="asize5" Runat="Server">
</asp:Content>

